package com.ymttest.database.sqlwapper.shenqisettlement;

import java.util.List;

import com.ymt.database.SqlManager;
import com.ymttest.database.model.shenqisettlement.TeFeeRateConfig;

public class TeFeeRateConfigWrapper {
	
	SqlManager manager;

	public TeFeeRateConfigWrapper() {
		manager = new SqlManager("shenqisettlement");
	}

	@SuppressWarnings("unchecked")
	public TeFeeRateConfig selectByPrimaryKey(String currency) {

		TeFeeRateConfig teFeeRateConfig = new TeFeeRateConfig();
		List<TeFeeRateConfig> result = manager
				.getSelectResults(
						"com.ymttest.database.mapping.shenqisettlement.TeFeeRateConfigMapper.selectByPrimaryKey",
						currency);
		manager.commit();

		if (result.size() > 0) {
			teFeeRateConfig = result.get(0);
		}

		return teFeeRateConfig;
	}
	
	public static void main(String[] args) {
		
		TeFeeRateConfigWrapper wrapper = new TeFeeRateConfigWrapper();
		
		System.out.println(wrapper.selectByPrimaryKey("AUD").getRate());
	}
}
